package com.twu.biblioteca;

import java.io.BufferedReader;
import java.io.InputStreamReader;


public class Login implements Task {
    LoginManager loginManager;
    Login(LoginManager loginManager){
        this.loginManager=loginManager;
    }
    @Override
    public void execute() throws Exception {
        BufferedReader in=new BufferedReader(new InputStreamReader(System.in));
        System.out.println("enter username:");
        String libraryNo = in.readLine();
        System.out.println("enter password");
        String password=in.readLine();
        loginManager.login(libraryNo,password);
        System.out.println("logged in successfully");

    }
}
